<?php

namespace app\admin\validate\user;

use think\Validate;

class Task extends Validate
{


    /**
     * 正则
     */
    //protected $regex = ['format' => '/(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})(\.(2(5[0-5]{1}|[0-4]\d{1})|[0-1]?\d{1,2})){3}/'];



    /**
     * 验证规则
     */
    protected $rule = [
        'user_id' => 'require|unique:user_task',
        'ip'      => 'require|ip'
    ];
    /**
     * 提示消息
     */
    protected $message = [
        'user_id.unique' => '客户名称已存在',
        'ip.ip' => '请填写规范的探测IP'
    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => [],
        'edit' => [],
    ];
    
}
